import { ref } from "vue";

export default function useCounter(initState, min, max) {
  const countRef = ref(initState || 0);
  return {
    count: countRef,
    increase() {
      countRef.value++;
    },
    decrease() {
      countRef.value--;
    },
  };
}
